import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '@/views/Home.vue'
import Login from '@/views/login/Login.vue'
import CloudInspect from '@/views/cloudInspect/CloudInspect.vue'
import PersonalCenter from '@/views/personalCenter/PersonalCenter.vue'
import WorkCenter from '@/views/workCenter/WorkCenter.vue'
import UsePdfJs from '@/views/tools/usePdfJs/index.vue'
import SinglePage from '@/views/tools/usePdfJs/singlePage/SinglePage.vue'
import MultiPage from '@/views/tools/usePdfJs/multiPage/MultiPage.vue'
import UseSlot from '@/views/useSlot/index.vue'

const routes = [{
  path: '/',
  component: Home,
  redirect: '/workCenter',
  children: [{
    path: '/workCenter',
    component: WorkCenter
  }, {
    path: '/cloudInspect',
    component: CloudInspect
  }, {
    path: '/personalCenter',
    component: PersonalCenter
  }]
}, {
  path: '/login',
  component: Login
}, {
  path: '/usePdfJs',
  component: UsePdfJs
}, {
  path: '/usePdfJs/singelePage',
  component: SinglePage
}, {
  path: '/usePdfJs/multiPage',
  component: MultiPage
}, {
  path: '/useSlot',
  component: UseSlot
}]

export default createRouter({
  history: createWebHashHistory(),
  routes
})
